package com.example.learn_gl_android.anglib.core.renderer.matrial

import com.example.learn_gl_android.anglib.util.MyGLUtil
import java.nio.FloatBuffer


data class Color (val r: Float = 0f,
                    val g : Float = 0f,
                    val b : Float = 0f,
                    val a : Float = 0f){
    companion object {
        fun toFloatBuffer(color: Color) : FloatBuffer {
            return MyGLUtil.initFloatBuffer1(color.r, color.g, color.b, color.a)
        }
    }
}